$(function(){ 
		function autoside(){
			$('.back-side').height($(window).height()-48);  
			$('.warp').css('minHeight',$(window).height()-48);	 
			$('.mainContentWhite').css('minHeight',$(window).height()-220);
			$('.inner.back-safe').css('minHeight',$(window).height()-200);
			$('.inner.pointRole').css('minHeight',$(window).height()-200);
		}
		$("#handBody button.choseOpButt").hover(function(){
			$(this).attr("title",$(this).text().trim());
		});
		$(window).resize(function(){
			autoside()	
		}).trigger('resize');
		
		/*供应商tip**/
		/*$(".supTip").hover(function(){ 
			var supTip='<div class="arrowP">'
				+'<p style="padding: 10px;">'
					+'<strong>'
						+'金牌采购商：'
					+'</strong>'
					+'此采购商已加入平台金牌采购商，为平台优质采购商。'
				+'</p>'
				+'<div class="orangeArrow">'
					+'<div class="fenArrow"></div>'
				+'</div>'
			+'</div>';
			$(this).append(supTip);
			$(this).children("a").addClass("orangeBack");
		},
		function(){
			$(this).children(".arrowP").remove();
			$(this).children("a").removeClass("orangeBack");
		});*/
		 
});


/**
 * 不常用方法
 * Created by 张栋 on 2017/2/17 14:40
 */
jQuery.my ={
	//将数值四舍五入(保留2位小数)后格式化成金额形式,base表示,
	currency:function (num,symbol,base) {
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;

		if(base){
			for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
				num = num.substring(0,num.length-(4*i+3))+','+
					num.substring(num.length-(4*i+3));
		}


		var result = (((sign)?'':'-') + num + '.' + cents);
		// var result= num.toString().split('').reverse().join('').replace(/(\d{3}(?=\d)(?!\d+\.|$))/g, '$1,').split('').reverse().join('');
		if(symbol){
			return "￥"+result;
		}else{
			return result;
		}
	},
	postForm:function(url, params){
		var temp = document.createElement("form");
		temp.action = url;
		temp.method = "post";
		temp.style.display = "none";
		for (var x in params) {
			var opt = document.createElement("textarea");
			opt.name = x;
			opt.value = params[x];
			temp.appendChild(opt);
		}
		document.body.appendChild(temp);
		temp.submit();
		return temp;
	}


};
